Skip to content

Display labels in sentence case, rename Windows type to Windows audience#1332

Merged
maebeale merged 5 commits intomainfrom
maebeale/sentence-case-labels
Mar 8, 2026
Merged

Display labels in sentence case, rename Windows type to Windows audience#1332
maebeale merged 5 commits intomainfrom
maebeale/sentence-case-labels

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 3, 2026

What is the goal of this PR and why is this important?

  • Standardize UI labels to sentence case instead of Title Case for category types and related dropdowns
  • Rename all user-facing "Windows type" / "Windows Type" references to "Windows audience" for clearer terminology

How did you approach the change?

  • Replaced .titleize with .humanize in CategoryTypeDecorator#title, CategoryType#display_label, and the _dropdown_filter partial so labels render as sentence case (e.g. "Art type" not "Art Type")
  • Updated hardcoded "Windows type" / "Windows Type" strings to "Windows audience" across 11 views, 1 controller, and 1 helper
  • Added decorator spec and model spec for the sentence-case behavior

UI Testing Checklist

  • Workshop index filters show sentence-case dropdown labels (e.g. "Art type", "Emotional theme", "Windows audience")
  • Story index table header shows "Windows audience"
  • Story form shows "Windows audience" label and "Select audience" prompt
  • Organization form shows "Windows audience" label
  • Organization search shows "Windows audience" filter label
  • Bookmarks search shows "Windows audience" filter label
  • Story ideas index shows "Windows audience" column header
  • Admin cards show "Windows audiences" reference card
  • Workshop log wizard shows "New workshop windows audience" label

Anything else to add?

  • Two files (workshops/_form.html.erb and workshop_ideas/_form.html.erb) already had "Windows audience" from a prior change

🤖 Generated with Claude Code

@maebeale maebeale force-pushed the maebeale/sentence-case-labels branch from ff02f6f to 25718d5 Compare March 4, 2026 10:39
age_range_order = ["3-5", "6-12", "13-17", "18+", "Mixed-age groups", "Family windows"]
age_range_order.each_with_index do |name, i|
Category.where("LOWER(name) = LOWER(?)", name).update_all(position: i + 1)
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding position to age range seeds so they match prod

@maebeale maebeale changed the title Display labels in sentence case, rename Windows type to Windows audience HOLD: Display labels in sentence case, rename Windows type to Windows audience Mar 4, 2026
maebeale and others added 5 commits March 8, 2026 09:10
Replace .titleize with .humanize for category type display so labels
render as sentence case (e.g. "Art type" instead of "Art Type").
Rename all user-facing "Windows type" / "Windows Type" strings to
"Windows audience" for consistency with the updated terminology.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix RuboCop SpaceInsideArrayLiteralBrackets in seeds.rb
- Update workshops system specs: "Windows Audience" → "Windows audience"
- Update stories view spec: "Age Range" → "Age range"
- Update person filters test: "Windows Type" → "Windows audience"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
.humanize alone turns "AgeRange" into "Agerange". Adding .underscore
first converts to "age_range", then .humanize produces "Age range".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/sentence-case-labels branch from d5cf0fe to 02b45a0 Compare March 8, 2026 13:10
@maebeale maebeale changed the title HOLD: Display labels in sentence case, rename Windows type to Windows audience Display labels in sentence case, rename Windows type to Windows audience Mar 8, 2026
@maebeale maebeale merged commit 257f0a4 into main Mar 8, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/sentence-case-labels branch March 8, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant